package net.sourceforge.peertwitter.mbpast.messaging;

import net.sourceforge.peertwitter.mbpast.ReplicationTimestamp;
import rice.p2p.commonapi.Id;
import rice.p2p.commonapi.NodeHandle;

public class ReplicaTimestampRequestAck extends MBPastMessageTemplate {

	private static final long serialVersionUID = -4525804819201266733L;
	private final Id replicationId;
	private final ReplicationTimestamp timestamp;
	private final int uniqueId;


	public Id getReplicationId() {
		return replicationId;
	}


	@Override
	public String toString() {
		return "ReplicaTimestampRequestAck [sender=" + getSender() + ", replicaId="
				+ replicationId + ", uniqueId=" + uniqueId + "]";
	}

	public ReplicaTimestampRequestAck(NodeHandle sender, Id replicationId, ReplicationTimestamp timestamp, int uniqueId) {
		super(sender);
		this.replicationId = replicationId;
		this.timestamp = timestamp;
		this.uniqueId = uniqueId;
	}
	
	

	public int getUniqueId() {
		return uniqueId;
	}

	@Override
	public int getPriority() {
		return HIGH_PRIORITY;
	}

	public ReplicationTimestamp getTimestamp() {
		return timestamp;
	}

}
